<?php

if(isset($_GET['page'])) $page = $_GET['page'];
else $page = '';

$ds=mysql_fetch_array(safe_query("SELECT * FROM ".PREFIX."page WHERE name='".$page."'"));
$_language->read_module("page");
$allowed = false; 
switch($ds['accesslevel']) {
	case 0: 
		$allowed = true; 
		break;
	case 1: 
		if($userID) $allowed = true; 
		break;
	case 2: 
		if(isclanmember($userID)) $allowed = true; 
		break;
}

if($allowed) {
 	$content = $ds['content'];
	echo toggle(htmloutput($content),1);
}
else{
	redirect("",$_language->module['no_access'],3);
}
?>
